Proxynect to enable multiple low-latency Kinect clients#401
Open
nneonneo wants to merge 6 commits intoOpenKinect:masterfrom
Open
Proxynect to enable multiple low-latency Kinect clients#401nneonneo wants to merge 6 commits intoOpenKinect:masterfrom
nneonneo wants to merge 6 commits intoOpenKinect:masterfrom
Conversation
Proxynect passes all requests through a persistent daemon process. This allows the Kinect to be used by more than one process at a time, and also solves some issues relating to repeated reinitialization (e.g. gradually shifting depth values). Signed-off-by: Robert Xiao <brx@cs.cmu.edu>
We also avoid setting the mode if there's no change; this prevents problems with repeated depth or video start/stops. Signed-off-by: Robert Xiao <brx@cs.cmu.edu>
Signed-off-by: Robert Xiao <brx@cs.cmu.edu>
Signed-off-by: Robert Xiao <brx@cs.cmu.edu>
Signed-off-by: Robert Xiao <brx@cs.cmu.edu>
Signed-off-by: Robert Xiao <brx@cs.cmu.edu>
e241863 to
4e489af
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For a project I did, it was necessary to have one Kinect be used by two very separate programs.
The usual approach is to e.g. stream data over TCP. But this is rather slow with full-frame full-speed RGB/depth data.
Instead, I implemented an approach that uses shared memory IPC to share a single memory buffer with multiple clients. Synchronization and limited control over the depth stream are provided. The library works on POSIX systems supporting
shm_open, which should cover Linux and OS X. No solution for Windows yet, but Cygwin supportsshm_openwhich means that this should theoretically work under Windows if you're willing to use Cygwin.Usage is similar to using
fakenect. Launch theproxydaemonin the background, then have clients load libraries fromlib/proxynect.One final advantage is that this approach enables "keep-alive" of the Kinect, which reduces startup time (for programs that are not persistent). This helped me a lot when developing, since I could rerun my app without having to wait for the Kinect depth stream to settle.